package com.example.test.operate.util;

/*************************************************************************
 *          HONGLING CAPITAL CONFIDENTIAL AND PROPRIETARY
 *
 *          COPYRIGHT (C) HONGLING CAPITAL CORPORATION 2012
 *    ALL RIGHTS RESERVED BY HONGLING CAPITAL CORPORATION. THIS PROGRAM
 * MUST BE USED SOLELY FOR THE PURPOSE FOR WHICH IT WAS FURNISHED BY
 * HONGLING CAPITAL CORPORATION. NO PART OF THIS PROGRAM MAY BE REPRODUCED
 * OR DISCLOSED TO OTHERS, IN ANY FORM, WITHOUT THE PRIOR WRITTEN
 * PERMISSION OF HONGLING CAPITAL CORPORATION. USE OF COPYRIGHT NOTICE
 * DOES NOT EVIDENCE PUBLICATION OF THE PROGRAM.
 *          HONGLING CAPITAL CONFIDENTIAL AND PROPRIETARY
 *************************************************************************/


import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 时间格式化工具类。
 *
 * @Wenchao.L
 * @version 1.0
 * @date 15-3-24 下午5:04
 */
public class DateUtil {


    public static final String DATE_FORMAT_TYPE1 = "yyyy-MM-dd HH:mm:ss";
    public static final String DATE_FORMAT_TYPE3 = "yyyy/MM/dd HH:mm:ss";
    public static final String DATE_FORMAT_TYPE4 = "MM/dd/yyyy";
    public static final String DEFAULTF = "EEE MMM dd HH:mm:ss z yyyy";
    public static final String YMDE = "MM/dd/yyyy";
    public static final String YMDN = "yyyy/MM/dd";
    public static final String YMD = "MM月dd日yyyy年";
    public static final String YMDEC = "yyyy年MM月dd日";
    public static final String YMDSQL = "yyyy-MM-dd";
    public static final String HMSE = "HH:mm:ss";
    public static final String HMSC = "HH时mm分ss秒";
    public static final String DATE_FORMAT_TYPE2 = "yyyyMMddHHmmss";
    public static final String YYMMDD = "yy/MM/dd";
    public static final String YYMMDDHHMMSS = "yyMMddHHmmssSSS";
    public static final String YYMMDDHHMMSS2 = "yyMMddHHmmss";
    public static final String YYYYMMDDHHMM="yyyy-MM-dd HH:mm";
    public static final String YYMMDDHHMM="yyMMddHHmm";
    public static final String FULLYYYYMMDDHHMMSS="yyyyMMddHHmmss";
    public static final String YYYYMM="yyyy-MM";
    public static final String YYYYMMDD = "yyyyMMdd";



    /**
     * 将date时间转换String类型。
     *
     * @param date 。
     *@return 转换时间。
     */
    public static String fomatDate(Date date){
        SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_TYPE1);
        return sdf.format(date);
    }


}
